package cn.powertime.evaluation.vo;

import com.alibaba.fastjson.JSONObject;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.*;
import java.io.Serializable;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author liqi
 * @since 2019-04-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ReqSysUserEditVo implements Serializable {

    private static final long serialVersionUID = 1L;


    /**
     * 姓名
     */
    //@Pattern(regexp = "[\\u4e00-\\u9fa5]{2,6}", message = "姓名不能为空，必须由2-6个汉字组成")
   // @Pattern(regexp = "([\\u4e00-\\u9fa5]{2,10})|([A-Za-z]{4,12})", message = "姓名必须由4-12个字母或2-10个汉字组成")
    private String username;


    /**
     * 昵称
     */
    //@Pattern(regexp = "([\\u4e00-\\u9fa5]{2,10})|([A-Za-z0-9]{4,12})", message = "昵称必须由4-12个字母和数字或2-10个汉字组成")
    @Length(max = 12, message = "昵称不能超过12个字符")
    private String nickname;


    /**
     * 头像
     */
    private Long avatar;

    /**
     * 邮箱
     */
    //@Email(message = "邮箱格式不正确")
    private String email;


    /**
     * 1:男，0:女
     */
    private Integer sex;





    private String introduction;


    @Override
    public String toString() {
        return JSONObject.toJSONString(this);
    }

}
